Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this pull request do?
add new single category search page
add tests
add custom content
add custom styling for hlpas
you can test localy with this url:
http://localhost:8000/single-category-search?categories=med&search=
http://localhost:8000/single-category-search?categories=wb&search=
or modify it for the UAT environment.
You can swap the category code for any other one and it will work e.g wb, pl, hou, mat, com etc
Next steps:
at present you can submit a postcode which queries LAALAA with the postcode and category and returns a result set. which looks like this:
results=[{'telephone': '01625 704 090', 'location': {'address': 'Riverside Court', 'city': 'Wilmslow', 'postcode': 'SK9 1DL', 'point': {'type': 'Point', 'coordinates': [-2.226143, 53.329065]}, 'type': 'Office'}, 'organisation':.....
However when it gets to the template to display it it looks like this:
"Search results: {'count': 146, 'next': 'https://laa-legal-adviser-api-staging.apps.live-1.cloud-platform.service.justice.gov.uk/legal-advisers/?categories=med&page=2&postcode=WA157UE', 'previous': None, 'results': [{'telephone': '01625 704 090', 'location': {'address': 'Riverside Court', 'city': 'Wilmslow', 'postcode': 'SK9 1D
the extra text at the beginning is breaking the display. so somewhere between getting the LAALAA response and displaying it we are offloading some processing to EnglandOrWalesState and thats where I am stuck.
This issue above is solved, but in solving it I kicked the problem down the road. as a result of transforming the data myself it now cannot be displayed on the results.html template
see the comments added in this commit:
da1a680
Any other changes that would benefit highlighting?
Intentionally left blank.
Checklist